package com.summit.exam.servlet;


import com.summit.exam.dbdao.ScoreInfoDao;
import com.summit.exam.entity.ScoreInfoBean;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;

public class AdminScoreServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //查看所有考试
        req.setCharacterEncoding("UTF-8");
        resp.setContentType("text/html;charset=UTF-8");

        //查询所有考生的考试信息

        //查询该用户信息
        ScoreInfoDao scoreInfo = new ScoreInfoDao();
        ArrayList<ScoreInfoBean> infoArrayList = scoreInfo.selectInfo2();

        req.setAttribute("infoArrayList", infoArrayList);

        req.getRequestDispatcher("/ExamSystem/techweb/AdminStudentScore.jsp").forward(req, resp);
    }
}
